package com.serverlite.system.module.controller;

import org.json.JSONArray;

import com.serverlite.framework.servlet.core.WebPage;
import com.serverlite.framework.servlet.mapping.Controller;
import com.serverlite.framework.servlet.mapping.RequestMapping;
import com.serverlite.system.module.service.ModuleService;

@Controller(value="/system/module")
public class ModuleController {
    
    @RequestMapping(value="/index")
    public WebPage index(){
        return new WebPage().forward("/system/module/index.jsp");
    }
    
    /**
     * 加载模块树
     */
    @RequestMapping(value="/tree")
    public JSONArray tree(){
        return ModuleService.tree("-1");
    }
    
    @RequestMapping(value="/list")
    public JSONArray list(){
        return ModuleService.list();
    }
}
